
export const setToken = (key, val) => {
  if (typeof val === 'object') {
    localStorage.setItem(key, JSON.stringify(val))
  } else {
    localStorage.setItem(key, val)
  }
}
export const getToken = (key) => {
  try {
    return JSON.parse(localStorage.getItem(key))
  } catch (err) {
    return localStorage.getItem(key)
  }
}
export const removeToken = (key) => localStorage.removeItem(key)
